Integrand size = 37, antiderivative size = 508 \[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=-\frac {d^{3/2} \arctan \left (1-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \arctan \left (1+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}+\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b-\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}-\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b+\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}+\frac {d^{3/2} \log \left (\sqrt {d}-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}}-\frac {d^{3/2} \log \left (\sqrt {d}+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}} \]
[Out]
Time = 0.51 (sec) , antiderivative size = 508, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.297, Rules used = {2988, 2654, 303, 1176, 631, 210, 1179, 642, 2987, 2986, 1232} \[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b-\sqrt {b^2-a^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {\cos (e+f x)+1}}\right ),-1\right )}{b f \sqrt {b^2-a^2} \sqrt {g \cos (e+f x)}}-\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b+\sqrt {b^2-a^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {\cos (e+f x)+1}}\right ),-1\right )}{b f \sqrt {b^2-a^2} \sqrt {g \cos (e+f x)}}-\frac {d^{3/2} \arctan \left (1-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \arctan \left (\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}+1\right )}{\sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \log \left (-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)+\sqrt {d}\right )}{2 \sqrt {2} b f \sqrt {g}}-\frac {d^{3/2} \log \left (\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)+\sqrt {d}\right )}{2 \sqrt {2} b f \sqrt {g}} \]
[In]
[Out]
Rule 210
Rule 303
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 1232
Rule 2654
Rule 2986
Rule 2987
Rule 2988
Rubi steps \begin{align*} \text {integral}& = \frac {d \int \frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}} \, dx}{b}-\frac {(a d) \int \frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx}{b} \\ & = \frac {\left (2 d^2 g\right ) \text {Subst}\left (\int \frac {x^2}{d^2+g^2 x^4} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{b f}-\frac {\left (a d \sqrt {\cos (e+f x)}\right ) \int \frac {\sqrt {d \sin (e+f x)}}{\sqrt {\cos (e+f x)} (a+b \sin (e+f x))} \, dx}{b \sqrt {g \cos (e+f x)}} \\ & = -\frac {d^2 \text {Subst}\left (\int \frac {d-g x^2}{d^2+g^2 x^4} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{b f}+\frac {d^2 \text {Subst}\left (\int \frac {d+g x^2}{d^2+g^2 x^4} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{b f}-\frac {\left (2 \sqrt {2} a \left (1-\frac {b}{\sqrt {-a^2+b^2}}\right ) d^2 \sqrt {\cos (e+f x)}\right ) \text {Subst}\left (\int \frac {1}{\left (\left (b-\sqrt {-a^2+b^2}\right ) d+a x^2\right ) \sqrt {1-\frac {x^4}{d^2}}} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {1+\cos (e+f x)}}\right )}{b f \sqrt {g \cos (e+f x)}}-\frac {\left (2 \sqrt {2} a \left (1+\frac {b}{\sqrt {-a^2+b^2}}\right ) d^2 \sqrt {\cos (e+f x)}\right ) \text {Subst}\left (\int \frac {1}{\left (\left (b+\sqrt {-a^2+b^2}\right ) d+a x^2\right ) \sqrt {1-\frac {x^4}{d^2}}} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {1+\cos (e+f x)}}\right )}{b f \sqrt {g \cos (e+f x)}} \\ & = \frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b-\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}-\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b+\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}+\frac {d^2 \text {Subst}\left (\int \frac {1}{\frac {d}{g}-\frac {\sqrt {2} \sqrt {d} x}{\sqrt {g}}+x^2} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{2 b f g}+\frac {d^2 \text {Subst}\left (\int \frac {1}{\frac {d}{g}+\frac {\sqrt {2} \sqrt {d} x}{\sqrt {g}}+x^2} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{2 b f g}+\frac {d^{3/2} \text {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt {d}}{\sqrt {g}}+2 x}{-\frac {d}{g}-\frac {\sqrt {2} \sqrt {d} x}{\sqrt {g}}-x^2} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{2 \sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \text {Subst}\left (\int \frac {\frac {\sqrt {2} \sqrt {d}}{\sqrt {g}}-2 x}{-\frac {d}{g}+\frac {\sqrt {2} \sqrt {d} x}{\sqrt {g}}-x^2} \, dx,x,\frac {\sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}\right )}{2 \sqrt {2} b f \sqrt {g}} \\ & = \frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b-\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}-\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b+\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}+\frac {d^{3/2} \log \left (\sqrt {d}-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}}-\frac {d^{3/2} \log \left (\sqrt {d}+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}-\frac {d^{3/2} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}} \\ & = -\frac {d^{3/2} \arctan \left (1-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}+\frac {d^{3/2} \arctan \left (1+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {g \cos (e+f x)}}\right )}{\sqrt {2} b f \sqrt {g}}+\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b-\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}-\frac {2 \sqrt {2} a d^{3/2} \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (-\frac {a}{b+\sqrt {-a^2+b^2}},\arcsin \left (\frac {\sqrt {d \sin (e+f x)}}{\sqrt {d} \sqrt {1+\cos (e+f x)}}\right ),-1\right )}{b \sqrt {-a^2+b^2} f \sqrt {g \cos (e+f x)}}+\frac {d^{3/2} \log \left (\sqrt {d}-\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}}-\frac {d^{3/2} \log \left (\sqrt {d}+\frac {\sqrt {2} \sqrt {g} \sqrt {d \sin (e+f x)}}{\sqrt {g \cos (e+f x)}}+\sqrt {d} \tan (e+f x)\right )}{2 \sqrt {2} b f \sqrt {g}} \\ \end{align*}
Result contains higher order function than in optimal. Order 6 vs. order 4 in optimal.
Time = 11.80 (sec) , antiderivative size = 518, normalized size of antiderivative = 1.02 \[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\frac {10 \left (a^2-b^2\right ) \cot (e+f x) (d \sin (e+f x))^{3/2} \left (a+b \sqrt {\sin ^2(e+f x)}\right ) \left (\frac {a \operatorname {AppellF1}\left (\frac {1}{4},-\frac {1}{4},1,\frac {5}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )}{5 \left (a^2-b^2\right ) \operatorname {AppellF1}\left (\frac {1}{4},-\frac {1}{4},1,\frac {5}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )+\left (-4 b^2 \operatorname {AppellF1}\left (\frac {5}{4},-\frac {1}{4},2,\frac {9}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )+\left (-a^2+b^2\right ) \operatorname {AppellF1}\left (\frac {5}{4},\frac {3}{4},1,\frac {9}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )\right ) \cos ^2(e+f x)}+\frac {b \operatorname {AppellF1}\left (\frac {1}{4},-\frac {3}{4},1,\frac {5}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right ) \sqrt {\sin ^2(e+f x)}}{-5 \left (a^2-b^2\right ) \operatorname {AppellF1}\left (\frac {1}{4},-\frac {3}{4},1,\frac {5}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )+\left (4 b^2 \operatorname {AppellF1}\left (\frac {5}{4},-\frac {3}{4},2,\frac {9}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )+3 \left (a^2-b^2\right ) \operatorname {AppellF1}\left (\frac {5}{4},\frac {1}{4},1,\frac {9}{4},\cos ^2(e+f x),\frac {b^2 \cos ^2(e+f x)}{-a^2+b^2}\right )\right ) \cos ^2(e+f x)}\right )}{f \sqrt {g \cos (e+f x)} (-a+b \sin (e+f x)) (a+b \sin (e+f x))^2} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 884 vs. \(2 (401 ) = 802\).
Time = 1.89 (sec) , antiderivative size = 885, normalized size of antiderivative = 1.74
method | result | size |
default | \(-\frac {\left (\frac {d \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1}\right )^{\frac {3}{2}} \left (i \Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) a \sqrt {-a^{2}+b^{2}}-i \Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) b \sqrt {-a^{2}+b^{2}}-i \Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) a \sqrt {-a^{2}+b^{2}}+i \Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) b \sqrt {-a^{2}+b^{2}}-\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {-a^{2}+b^{2}}\, a +\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) b \sqrt {-a^{2}+b^{2}}-\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) a \sqrt {-a^{2}+b^{2}}+\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) b \sqrt {-a^{2}+b^{2}}+\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {a}{-b +\sqrt {-a^{2}+b^{2}}+a}, \frac {\sqrt {2}}{2}\right ) \sqrt {-a^{2}+b^{2}}\, a +\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {a}{-b +\sqrt {-a^{2}+b^{2}}+a}, \frac {\sqrt {2}}{2}\right ) a^{2}-\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, \frac {a}{-b +\sqrt {-a^{2}+b^{2}}+a}, \frac {\sqrt {2}}{2}\right ) a b +\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, -\frac {a}{b +\sqrt {-a^{2}+b^{2}}-a}, \frac {\sqrt {2}}{2}\right ) \sqrt {-a^{2}+b^{2}}\, a -\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, -\frac {a}{b +\sqrt {-a^{2}+b^{2}}-a}, \frac {\sqrt {2}}{2}\right ) a^{2}+\Pi \left (\sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}, -\frac {a}{b +\sqrt {-a^{2}+b^{2}}-a}, \frac {\sqrt {2}}{2}\right ) a b \right ) \sqrt {-\csc \left (f x +e \right )+\cot \left (f x +e \right )}\, \sqrt {2+2 \cot \left (f x +e \right )-2 \csc \left (f x +e \right )}\, \sqrt {-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1}\, \left (\left (1-\cos \left (f x +e \right )\right )^{2}+\sin ^{2}\left (f x +e \right )\right ) \sqrt {2}\, a}{f \left (1-\cos \left (f x +e \right )\right )^{2} \sqrt {-\frac {g \left (\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )-1\right )}{\left (1-\cos \left (f x +e \right )\right )^{2} \left (\csc ^{2}\left (f x +e \right )\right )+1}}\, b \sqrt {-a^{2}+b^{2}}\, \left (-b +\sqrt {-a^{2}+b^{2}}+a \right ) \left (b +\sqrt {-a^{2}+b^{2}}-a \right )}\) | \(885\) |
[In]
[Out]
Timed out. \[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\int \frac {\left (d \sin {\left (e + f x \right )}\right )^{\frac {3}{2}}}{\sqrt {g \cos {\left (e + f x \right )}} \left (a + b \sin {\left (e + f x \right )}\right )}\, dx \]
[In]
[Out]
\[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\int { \frac {\left (d \sin \left (f x + e\right )\right )^{\frac {3}{2}}}{\sqrt {g \cos \left (f x + e\right )} {\left (b \sin \left (f x + e\right ) + a\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\int { \frac {\left (d \sin \left (f x + e\right )\right )^{\frac {3}{2}}}{\sqrt {g \cos \left (f x + e\right )} {\left (b \sin \left (f x + e\right ) + a\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(d \sin (e+f x))^{3/2}}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx=\int \frac {{\left (d\,\sin \left (e+f\,x\right )\right )}^{3/2}}{\sqrt {g\,\cos \left (e+f\,x\right )}\,\left (a+b\,\sin \left (e+f\,x\right )\right )} \,d x \]
[In]
[Out]